set(SquirrelScript_SRC
	EntityFactory.cpp
	EntityWrapper.cpp
	InputOutput.cpp
	LogHooker.cpp
	SquirrelScriptEngine.cpp
	SquirrelUtil.cpp
	${CMAKE_CURRENT_BINARY_DIR}/Wrapper.cpp
)
set(Wrapper_INC
	-I${Xern_SOURCE_DIR}/include
)

# Add the current directory.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_custom_command(
  OUTPUT Wrapper.cpp 
  COMMAND Swig ${Wrapper_INC} -Wall -c++ -squirrel -o Wrapper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper.i
  DEPENDS Swig Wrapper.i XernCore.i XernMath.i boost_uuid.i boost_enable_shared_from_this.i
)
 
add_library(SquirrelScript MODULE ${SquirrelScript_SRC})
target_link_libraries(SquirrelScript Squirrel SqStdLib)
